package com.dsh.userSetting.service.impl;

import com.dsh.userSetting.dao.IntegralGoodsDao;
import com.dsh.userSetting.entity.vo.IntegralGoodsVo;
import com.dsh.userSetting.entity.vo.ProjectVo;
import com.dsh.userSetting.service.IntegralGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class IntegralGoodsImpl implements IntegralGoodsService {
    @Autowired
    IntegralGoodsDao integralGoodsDao;

    @Override
    public List<IntegralGoodsVo> findAllIntegralGoods() {
        List<IntegralGoodsVo> allIntegralGoods = integralGoodsDao.findAllIntegralGoods();
        return allIntegralGoods;
    }

    @Override
    public int insertIntegralGoods(IntegralGoodsVo integralGoodsVo) {
        int i = integralGoodsDao.insertIntegralGoods(integralGoodsVo);
        return i;
    }

    @Override
    public int updateIntegralGoods(IntegralGoodsVo integralGoodsVo) {
        int i = integralGoodsDao.updateIntegralGoods(integralGoodsVo);
        return i;
    }

    @Override
    public List<ProjectVo> selectProject() {
        List<ProjectVo> projectVos = integralGoodsDao.selectProject();
        return projectVos;
    }

    @Override
    public IntegralGoodsVo IntegralGoodsById(int id) {
        IntegralGoodsVo integralGoodsVo = integralGoodsDao.IntegralGoodsById(id);
        return integralGoodsVo;
    }
}
